﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using UnityEngine;

public class DrowLineMrg
{
    private static DrowLineMrg _ins;
    public static DrowLineMrg Instance
    {
        get
        {
            if (DrowLineMrg._ins == null) DrowLineMrg._ins = new DrowLineMrg();
            return DrowLineMrg._ins;
        }
    }
    public LineRenderer lineRenderer;
    private List<ItemCell> itemCells = new List<ItemCell>();
    public void Add(ItemCell itemCell)
    {
        if(LogicMrg.Instance.CheckItemCellAllow(itemCell) && !itemCells.Contains(itemCell))
        {
            lineRenderer.SetPosition(itemCells.Count, itemCell.pos);
            lineRenderer.startWidth=5;
            lineRenderer.endWidth=5;
            itemCells.Add(itemCell);
        }
    }
}
